package com.baomidou.mybatisplus.samples.quickstart.listener;

import com.baomidou.mybatisplus.samples.quickstart.entity.CustomEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * @author zhang
 */
@Component
public class CustomEventListener {

    @EventListener(CustomEvent.class)
    public void onApplicationEvent(CustomEvent customEvent) throws InterruptedException {
        System.out.println("监听器接受消息："+ customEvent.getMessage());
    }
}